﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace chat
{
    public partial class Online : Form
    {
        private String taikhoan;
        public Online(String name)
        {
            taikhoan = name;
            InitializeComponent();
            listView1.View = View.Details;
            listView1.GridLines = true;
            listView1.FullRowSelect = true;
            label2.Text = taikhoan;
        }
        public delegate void LoginExit(Object sender,thoatLogin e);

        public class thoatLogin : EventArgs { }
        private thoatLogin thoat;
        public event LoginExit el;
        public void setEvent(LoginExit log, thoatLogin th)
        {
            if (log != null)
            {
                log(null, th);
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("ban vua click SMS");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            MessageBox.Show("ban vua click Call");
        }

        private void button4_Click(object sender, EventArgs e)
        {
            MessageBox.Show("ban vua click Lich su chat");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Online_Load(object sender, EventArgs e)
        {

        }

        private void Online_FormClosing(object sender, FormClosingEventArgs e)
        {
            thoat = new thoatLogin();
            setEvent(el, thoat);
        }
    }
}
